# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 42
n 42(None)[return context['parent'] not in (None, RootItem())
]:
	i: 0(f), 25()
	o: 

nname: 25
n 25(None)[]:
	i: 0(t)
	o: 42()

nname: 0
n 0(context['parent'] not in (None, RootItem()))[]:
	i: 
	o: 25(t), 42(f)

nname: 0
n 0(None)[if context['parent'] not in (None, RootItem()):
	pass
return context['parent'] not in (None, RootItem())
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb763610c>}
nname: 0
n 0(None)[return stack.back_to_menu(stack_layer)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb764c44c>}
nname: 695
n 695(None)[return act
]:
	i: 630(), 694()
	o: 

nname: 694
n 694(None)[]:
	i: 588&594(f)
	o: 695()

nname: 630
n 630(None)[act.append(ActionItem(_('Display "%s" as thumbnails') % context['parent'].name, type_='action', action=push_thumbnail_menu, args=(context, stack)))
]:
	i: 588&594(t)
	o: 695()

nname: 588&594
n 588&594(menu_video_photo and any(<genexpr>(context['menu'].get_item_list('main_list'))))[]:
	i: 451(AL), 583(), 587()
	o: 630(t), 694(f)

nname: 587
n 587(None)[]:
	i: 393&399&420&435(f)
	o: 588&594()

nname: 583
n 583(None)[]:
	i: 508(AF), 515()
	o: 588&594()

nname: 515
n 515(None)[for plugin_name in ('marker_create_playlist',):
plugin = actions[plugin_name]
act.append(ActionItem(_(plugin.caption), type_='action', action=plugin.execute, args=[context]))
]:
	i: 508(for)
	o: 583()

nname: 508
n 508(None)[]:
	i: 451(loop)
	o: 515(for), 583(AF)

nname: 451
n 451(None)[act.append(ActionItem(_('Duplicate marked item'), type_='action', action=execute_copy_marked_items, args=[context['parent'], fl]))
]:
	i: 393&399&420&435(t)
	o: 508(loop), 588&594(AL)

nname: 393&399&420&435
n 393&399&420&435(fl and context['parent']['backend'] != 'upnp' and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']))[]:
	i: 338(JA), 388(), 392()
	o: 451(t), 587(f)

nname: 392
n 392(None)[]:
	i: 273&279&286&301(f)
	o: 393&399&420&435()

nname: 388
n 388(None)[]:
	i: 317(f)
	o: 393&399&420&435()

nname: 338
n 338(None)[act.append(ActionItem(_('Create a new folder'), type_='action', action=execute_mkdir, args=[context]))
]:
	i: 317(t)
	o: 393&399&420&435(JA)

nname: 317
n 317(context['parent']['backend'] != 'upnp')[]:
	i: 273&279&286&301(t)
	o: 338(t), 388(f)

nname: 273&279&286&301
n 273&279&286&301((menu_music or menu_video_photo) and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']))[]:
	i: 215(JA), 268(), 272()
	o: 317(t), 392(f)

nname: 272
n 272(None)[]:
	i: 104(f)
	o: 273&279&286&301()

nname: 268
n 268(None)[]:
	i: 209(f)
	o: 273&279&286&301()

nname: 215
n 215(None)[act.append(ActionItem(_('Display'), type_='action', action=(lambda : stack.back_to_menu(stack_layer))))
]:
	i: 209(t)
	o: 273&279&286&301(JA)

nname: 209
n 209(stack_layer)[]:
	i: 132(AL), 202()
	o: 215(t), 268(f)

nname: 202
n 202(None)[]:
	i: 136(AF), 198()
	o: 209()

nname: 198
n 198(None)[]:
	i: 152&173(f), 193()
	o: 202()

nname: 193
n 193(None)[break
continue
]:
	i: 152&173(t)
	o: 198()

nname: 152&173
n 152&173(isinstance(stack_layer, menu.Navigator) and not isinstance(stack_layer, menu.MarkerNavigator))[for stack_layer in reversed(stack.menus_stack):
]:
	i: 136(for)
	o: 193(t), 198(f)

nname: 136
n 136(None)[]:
	i: 132(loop)
	o: 152&173(for), 202(AF)

nname: 132
n 132(None)[]:
	i: 104(t)
	o: 136(loop), 209(AL)

nname: 104
n 104(isinstance(stack.menus_stack[-2], menu.MarkerNavigator))[menu_music = False
]:
	i: 93(), 100()
	o: 132(t), 272(f)

nname: 100
n 100(None)[]:
	i: 71(f)
	o: 104()

nname: 93
n 93(None)[]:
	i: 71(t)
	o: 104()

nname: 71
n 71(context['menu'].type in ('audio',))[menu_video_photo = False
]:
	i: 60(), 67()
	o: 93(t), 100(f)

nname: 67
n 67(None)[]:
	i: 0(f)
	o: 71()

nname: 60
n 60(None)[]:
	i: 0(t)
	o: 71()

nname: 0
n 0(context['menu'].type in ('image', 'video', 'video_image'))[stack = pygui_globs['menustack']
act = []
fl = markerlists().get(context['menu'].universe)
]:
	i: 
	o: 60(t), 67(f)

nname: 588&594
n 588&594(None)[if menu_video_photo and any(<genexpr>(context['menu'].get_item_list('main_list'))):
	act.append(ActionItem(_('Display "%s" as thumbnails') % context['parent'].name, type_='action', action=push_thumbnail_menu, args=(context, stack)))
return act
]:
	i: 515(), 273&279&286&301(f)
	o: 

nname: 515
n 515(None)[for plugin_name in ('marker_create_playlist',):
	plugin = actions[plugin_name]
	act.append(ActionItem(_(plugin.caption), type_='action', action=plugin.execute, args=[context]))
]:
	i: 451(for)
	o: 588&594()

nname: 451
n 451(None)[act.append(ActionItem(_('Duplicate marked item'), type_='action', action=execute_copy_marked_items, args=[context['parent'], fl]))
]:
	i: 273&279&286&301(t)
	o: 515(for)

nname: 273&279&286&301
n 273&279&286&301(fl and context['parent']['backend'] != 'upnp' and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']))[if (menu_music or menu_video_photo) and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
	if context['parent']['backend'] != 'upnp':
		act.append(ActionItem(_('Create a new folder'), type_='action', action=execute_mkdir, args=[context]))
]:
	i: 209(JA), 104(f)
	o: 451(t), 588&594(f)

nname: 209
n 209(None)[if stack_layer:
	act.append(ActionItem(_('Display'), type_='action', action=(lambda : stack.back_to_menu(stack_layer))))
]:
	i: 132(AL), 136(AF), 152&173(f)
	o: 273&279&286&301(JA)

nname: 152&173
n 152&173(None)[for stack_layer in reversed(stack.menus_stack):
if isinstance(stack_layer, menu.Navigator) and not isinstance(stack_layer, menu.MarkerNavigator):
	break
	continue
]:
	i: 136(for)
	o: 209()

nname: 136
n 136(None)[]:
	i: 132(loop)
	o: 152&173(for), 209(AF)

nname: 132
n 132(None)[]:
	i: 104(t)
	o: 136(loop), 209(AL)

nname: 104
n 104(isinstance(stack.menus_stack[-2], menu.MarkerNavigator))[menu_music = False
]:
	i: 0()
	o: 132(t), 273&279&286&301(f)

nname: 0
n 0(None)[stack = pygui_globs['menustack']
act = []
fl = markerlists().get(context['menu'].universe)
if context['menu'].type in ('image', 'video', 'video_image'):
	pass
menu_video_photo = False
if context['menu'].type in ('audio',):
	pass
]:
	i: 
	o: 104()

nname: 588&594
n 588&594(None)[if menu_video_photo and any(<genexpr>(context['menu'].get_item_list('main_list'))):
	act.append(ActionItem(_('Display "%s" as thumbnails') % context['parent'].name, type_='action', action=push_thumbnail_menu, args=(context, stack)))
return act
]:
	i: 451(), 273&279&286&301(f)
	o: 

nname: 451
n 451(None)[act.append(ActionItem(_('Duplicate marked item'), type_='action', action=execute_copy_marked_items, args=[context['parent'], fl]))
for plugin_name in ('marker_create_playlist',):
	plugin = actions[plugin_name]
	act.append(ActionItem(_(plugin.caption), type_='action', action=plugin.execute, args=[context]))
]:
	i: 273&279&286&301(t)
	o: 588&594()

nname: 273&279&286&301
n 273&279&286&301(fl and context['parent']['backend'] != 'upnp' and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']))[if (menu_music or menu_video_photo) and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
	if context['parent']['backend'] != 'upnp':
		act.append(ActionItem(_('Create a new folder'), type_='action', action=execute_mkdir, args=[context]))
]:
	i: 152&173(JA), 0(f)
	o: 451(t), 588&594(f)

nname: 152&173
n 152&173(None)[for stack_layer in reversed(stack.menus_stack):
	if isinstance(stack_layer, menu.Navigator) and not isinstance(stack_layer, menu.MarkerNavigator):
		break
		continue
if stack_layer:
	act.append(ActionItem(_('Display'), type_='action', action=(lambda : stack.back_to_menu(stack_layer))))
]:
	i: 132(for)
	o: 273&279&286&301(JA)

nname: 132
n 132(None)[]:
	i: 0(t)
	o: 152&173(for)

nname: 0
n 0(isinstance(stack.menus_stack[-2], menu.MarkerNavigator))[stack = pygui_globs['menustack']
act = []
fl = markerlists().get(context['menu'].universe)
if context['menu'].type in ('image', 'video', 'video_image'):
	pass
menu_video_photo = False
if context['menu'].type in ('audio',):
	pass
menu_music = False
]:
	i: 
	o: 132(t), 273&279&286&301(f)

nname: 273&279&286&301
n 273&279&286&301(None)[if (menu_music or menu_video_photo) and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
	if context['parent']['backend'] != 'upnp':
		act.append(ActionItem(_('Create a new folder'), type_='action', action=execute_mkdir, args=[context]))
if fl and context['parent']['backend'] != 'upnp' and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
	act.append(ActionItem(_('Duplicate marked item'), type_='action', action=execute_copy_marked_items, args=[context['parent'], fl]))
	for plugin_name in ('marker_create_playlist',):
		plugin = actions[plugin_name]
		act.append(ActionItem(_(plugin.caption), type_='action', action=plugin.execute, args=[context]))
if menu_video_photo and any(<genexpr>(context['menu'].get_item_list('main_list'))):
	act.append(ActionItem(_('Display "%s" as thumbnails') % context['parent'].name, type_='action', action=push_thumbnail_menu, args=(context, stack)))
return act
]:
	i: 132(JA), 0(f)
	o: 

nname: 132
n 132(None)[for stack_layer in reversed(stack.menus_stack):
	if isinstance(stack_layer, menu.Navigator) and not isinstance(stack_layer, menu.MarkerNavigator):
		break
		continue
if stack_layer:
	act.append(ActionItem(_('Display'), type_='action', action=(lambda : stack.back_to_menu(stack_layer))))
]:
	i: 0(t)
	o: 273&279&286&301(JA)

nname: 0
n 0(isinstance(stack.menus_stack[-2], menu.MarkerNavigator))[stack = pygui_globs['menustack']
act = []
fl = markerlists().get(context['menu'].universe)
if context['menu'].type in ('image', 'video', 'video_image'):
	pass
menu_video_photo = False
if context['menu'].type in ('audio',):
	pass
menu_music = False
]:
	i: 
	o: 132(t), 273&279&286&301(f)

nname: 0
n 0(None)[stack = pygui_globs['menustack']
act = []
fl = markerlists().get(context['menu'].universe)
if context['menu'].type in ('image', 'video', 'video_image'):
	pass
menu_video_photo = False
if context['menu'].type in ('audio',):
	pass
menu_music = False
if isinstance(stack.menus_stack[-2], menu.MarkerNavigator):
	for stack_layer in reversed(stack.menus_stack):
		if isinstance(stack_layer, menu.Navigator) and not isinstance(stack_layer, menu.MarkerNavigator):
			break
			continue
	if stack_layer:
		act.append(ActionItem(_('Display'), type_='action', action=(lambda : stack.back_to_menu(stack_layer))))
if (menu_music or menu_video_photo) and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
	if context['parent']['backend'] != 'upnp':
		act.append(ActionItem(_('Create a new folder'), type_='action', action=execute_mkdir, args=[context]))
if fl and context['parent']['backend'] != 'upnp' and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
	act.append(ActionItem(_('Duplicate marked item'), type_='action', action=execute_copy_marked_items, args=[context['parent'], fl]))
	for plugin_name in ('marker_create_playlist',):
		plugin = actions[plugin_name]
		act.append(ActionItem(_(plugin.caption), type_='action', action=plugin.execute, args=[context]))
if menu_video_photo and any(<genexpr>(context['menu'].get_item_list('main_list'))):
	act.append(ActionItem(_('Display "%s" as thumbnails') % context['parent'].name, type_='action', action=push_thumbnail_menu, args=(context, stack)))
return act
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb764858c>}
nname: 0
n 0(None)[from __future__ import absolute_import
name = 'Parentfolder'
position = 3
image = 'hand_parent'
category = 'navigator'
default = False
unique = False
from pygui.actions.jobs.common import push_thumbnail_menu
from pygui.actions.jobs.fs import execute_mkdir
from pygui.actions.jobs.marker import execute_copy_marked_items
from pygui.config import user_config
from pygui.item.core import ActionItem
from pygui.item.mediaitem.core import RootItem
from pygui.item.mediaitem.tv import TVRootItem
from pygui.shared import pygui_globs
from pygui.markerlist import actions, markerlists
from pygui.menu import menu
def is_available(context):
	if context['parent'] not in (None, RootItem()):
		pass
	return context['parent'] not in (None, RootItem())

def get_action_info_list(context):
	stack = pygui_globs['menustack']
	act = []
	fl = markerlists().get(context['menu'].universe)
	if context['menu'].type in ('image', 'video', 'video_image'):
		pass
	menu_video_photo = False
	if context['menu'].type in ('audio',):
		pass
	menu_music = False
	if isinstance(stack.menus_stack[-2], menu.MarkerNavigator):
		for stack_layer in reversed(stack.menus_stack):
			if isinstance(stack_layer, menu.Navigator) and not isinstance(stack_layer, menu.MarkerNavigator):
				break
				continue
		if stack_layer:
			act.append(ActionItem(_('Display'), type_='action', action=(lambda : stack.back_to_menu(stack_layer))))
	if (menu_music or menu_video_photo) and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
		if context['parent']['backend'] != 'upnp':
			act.append(ActionItem(_('Create a new folder'), type_='action', action=execute_mkdir, args=[context]))
	if fl and context['parent']['backend'] != 'upnp' and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
		act.append(ActionItem(_('Duplicate marked item'), type_='action', action=execute_copy_marked_items, args=[context['parent'], fl]))
		for plugin_name in ('marker_create_playlist',):
			plugin = actions[plugin_name]
			act.append(ActionItem(_(plugin.caption), type_='action', action=plugin.execute, args=[context]))
	if menu_video_photo and any(<genexpr>(context['menu'].get_item_list('main_list'))):
		act.append(ActionItem(_('Display "%s" as thumbnails') % context['parent'].name, type_='action', action=push_thumbnail_menu, args=(context, stack)))
	return act

]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7629eec>}
from __future__ import absolute_import
name = 'Parentfolder'
position = 3
image = 'hand_parent'
category = 'navigator'
default = False
unique = False
from pygui.actions.jobs.common import push_thumbnail_menu
from pygui.actions.jobs.fs import execute_mkdir
from pygui.actions.jobs.marker import execute_copy_marked_items
from pygui.config import user_config
from pygui.item.core import ActionItem
from pygui.item.mediaitem.core import RootItem
from pygui.item.mediaitem.tv import TVRootItem
from pygui.shared import pygui_globs
from pygui.markerlist import actions, markerlists
from pygui.menu import menu
def is_available(context):
	if context['parent'] not in (None, RootItem()):
		pass
	return context['parent'] not in (None, RootItem())

def get_action_info_list(context):
	stack = pygui_globs['menustack']
	act = []
	fl = markerlists().get(context['menu'].universe)
	if context['menu'].type in ('image', 'video', 'video_image'):
		pass
	menu_video_photo = False
	if context['menu'].type in ('audio',):
		pass
	menu_music = False
	if isinstance(stack.menus_stack[-2], menu.MarkerNavigator):
		for stack_layer in reversed(stack.menus_stack):
			if isinstance(stack_layer, menu.Navigator) and not isinstance(stack_layer, menu.MarkerNavigator):
				break
				continue
		if stack_layer:
			act.append(ActionItem(_('Display'), type_='action', action=(lambda : stack.back_to_menu(stack_layer))))
	if (menu_music or menu_video_photo) and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
		if context['parent']['backend'] != 'upnp':
			act.append(ActionItem(_('Create a new folder'), type_='action', action=execute_mkdir, args=[context]))
	if fl and context['parent']['backend'] != 'upnp' and (user_config['security']['parent_mode'] or not user_config['security']['parental_control']):
		act.append(ActionItem(_('Duplicate marked item'), type_='action', action=execute_copy_marked_items, args=[context['parent'], fl]))
		for plugin_name in ('marker_create_playlist',):
			plugin = actions[plugin_name]
			act.append(ActionItem(_(plugin.caption), type_='action', action=plugin.execute, args=[context]))
	if menu_video_photo and any(<genexpr>(context['menu'].get_item_list('main_list'))):
		act.append(ActionItem(_('Display "%s" as thumbnails') % context['parent'].name, type_='action', action=push_thumbnail_menu, args=(context, stack)))
	return act

